Skip to content

fix: add runtime-aware sudo_prefix for Lima/macOS compatibility#17

Merged
ethannortharc merged 1 commit intomainfrom
fix/lima-sudo-prefix
Mar 11, 2026
Merged

fix: add runtime-aware sudo_prefix for Lima/macOS compatibility#17
ethannortharc merged 1 commit intomainfrom
fix/lima-sudo-prefix

Conversation

@ethannortharc
Copy link
Copy Markdown
Owner

Summary

Test plan

  • cargo build succeeds
  • cargo test — all 67 tests pass
  • Test on macOS: devbox create --name test --tools go
  • Test on Linux: devbox destroy --name hive-dev && devbox create --name hive-dev --tools go

🤖 Generated with Claude Code

Previous PRs removed all sudo for Incus (which runs as root), but
this broke Lima (macOS) where limactl shell runs as user and needs
sudo for system operations. Added exec_runs_as_root() and sudo_prefix()
to Runtime trait — Incus returns "" (already root), Lima returns "sudo ".
All system commands now use sudo_prefix() + bash -lc for proper PATH.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ethannortharc ethannortharc merged commit 9e27f1c into main Mar 11, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant